import request from '@/utils/request'

// 获取商店评论列表
export function getComments(storeId) {
  return request({
    url: '/com/show',
    method: 'get',
    params: { storeid: storeId }
  })
}

// 添加评论
export function addComment(data) {
  return request({
    url: '/com/insert',
    method: 'post',
    data
  })
}

// 更新评论
export function updateComment(content, commentId) {
  return request({
    url: '/com/update',
    method: 'post',
    params: { content, commentid: commentId }
  })
}

// 删除评论
export function deleteComment(commentId) {
  return request({
    url: '/com/delete',
    method: 'post',
    params: { commentid: commentId }
  })
} 